<template>
  <div>
    <div ref="main" style=" width: 100%;height: 400px;"></div>
  </div>
</template>

<script>
import Echarts from 'echarts'
import { option } from './option.js'
export default {
  mounted() {
    this.get()
  },
  methods: {
    get() {
      // 基于准备好的dom，初始化echarts实例
      var myChart = Echarts.init(this.$refs.main)
      // 绘制图表
      myChart.setOption(option)
    }
  }
}
</script>

<style lang="less" scoped></style>
